package net.lab1024.sa.user.module.business.mall.controller;

import net.lab1024.sa.user.constant.UserSwaggerTagConst;
import net.lab1024.sa.user.module.business.mall.domain.form.FrontCategoryQueryForm;
import net.lab1024.sa.user.module.business.mall.domain.vo.FrontCategoryVO;
import net.lab1024.sa.user.module.business.mall.service.FrontCategoryService;
import net.lab1024.sa.common.common.domain.ResponseDTO;
import net.lab1024.sa.common.common.domain.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.validation.Valid;

/**
 * 前台类目 Controller
 *
 * @Author jabari
 * @Date 2023-06-01 15:12:18
 * @Copyright 51dev.cn
 */

@RestController
@Api(tags = UserSwaggerTagConst.Business.GOODS)
public class FrontCategoryController {

    @Autowired
    private FrontCategoryService frontCategoryService;

    @ApiOperation("分类查询 @author jabari")
    @PostMapping("/frontCategory/queryPage")
    public ResponseDTO<PageResult<FrontCategoryVO>> queryPage(@RequestBody @Valid FrontCategoryQueryForm queryForm) {
        return ResponseDTO.ok(frontCategoryService.queryPage(queryForm));
    }


}
